package com.yvon.maple.service.auth.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author : Yvon
 * @since : 2021-08-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "CodeParam", description = "生成验证码请求参数")
public class CodeParam implements Serializable {

    /**
     * 随机数/手机号/email
     * 和validateType对应
     *
     */
    @ApiModelProperty(value = "随机数/手机号/email")
    @NotEmpty(message = "key不能为空")
    private String key;

    /**
     * 验证类型
     * sms: 手机号验证码
     * email: 邮箱验证码
     * image: 图形验证码
     */
    @ApiModelProperty(value = "验证类型", example = "image", allowableValues = "image,sms,email")
    @NotEmpty(message = "验证类型不能为空")
    private String validateType;

}
